Learn how the indexing works in the Algolia extension for Magento Open Source and Adobe Commerce.
Command | Action |
---|---|
algolia_products | Reindex all products |
algolia_categories | Reindex all categories |
algolia_pages | Reindex all CMS pages |
algolia_suggestions | Reindex all search query suggestions |
algolia_additional_sections | Reindex all additional sections |
algolia_queue_runner | Process jobs in the indexing queue |
algolia_delete_products | Remove inactive products from Algolia indices |
php path/to/magento/bin/magento indexer:reindex algolia_products
PROCESS_FULL_QUEUE=1 php path/to/magento/bin/magento indexer:reindex algolia_queue_runner
Attribute | Description |
---|---|
name | Name |
url | URL |
visibility_search | Visibility in the search |
visibility_catalog | Visibility in the catalog |
categories | Categories, formatted as a tree path |
categories_without_path | Categories, without the tree path |
thumbnail_url | Thumbnail image |
image_url | Main image |
in_stock | Stock availability |
price | Price |
type_id | Type (simple, configurable, bundled, etc.) |
image_url
start with /pub
pub/
directory as the root directory for the Magento installation.
This is usually considered a good practice, but it has some drawbacks.
The extension can’t know which directory is the root folder for Magento, so it always assume the base directory is your root folder.
The best way to handle this problem is to make your server ignore /pub
in the URL.
If it’s not possible to change the server configuration, a setting is provided in Stores > Configuration > Algolia Search > Advanced > Remove /pub/ from image URLs.
When this setting is changed, reindex the catalog.
filterOnly
modifier if you only want to use the filtering feature. This will help optimize search speed and reduce index size.Sort | Records | Total |
---|---|---|
Default sorting | 100×2 | 200 |
Custom sorting | 100×2×4 | 800 |
Total records | 1000 |
Sort | Records | Total |
---|---|---|
Default sorting | 100×2 | 200 |
Pricing sorting | 100×2×2×5 | 2000 |
Custom sorting | 100×2×2 | 400 |
Total records | 2600 |
searchableAttributes
customRanking
unretrievableAttributes
attributesForFaceting
maxValuesPerFacet
removeWordsIfNoResults
algolia_products_index_before_set_settings
event provided by the extension. See Custom backend events for more information.
Attribute | Description |
---|---|
name | Name |
url | URL |
path | Path (parent categories) |
level | Level in the category tree |
include_in_menu | Visibility in the menu |
_tags | Filled automatically by the extension |
popularity | Popularity |
product_count | Amount of products |
algolia_categories_index_before_set_settings
event provided by the extension. See Custom backend events for more information.
Yes
the Algolia extension automatically indexes CMS pages, allowing users to search for pages in the Autocomplete menu. All active pages are indexed by default.
You can exclude specific pages, like error pages, so they don’t appear in the search results.
Turn off this indexing of pages in Additional Sections.
algolia_after_create_page_object
event provided by the extension. See Custom backend events for more information.
Attribute | Description |
---|---|
name | Name |
url | URL |
slug | Slug |
content | Content |
searchableAttributes
: unordered(slug)
, unordered(name)
and unordered(content)
attributesToSnippet
: content:7
algolia_pages_index_before_set_settings
event provided by the extension. See Custom Backend Events for a list of events provided by the extension.
catalogsearch_query
table in the database.
catalogsearch_query
is also updated, the queries in this table will become more relevant over time.
By default, suggestions aren’t indexed. When enabling the indexing of suggestions, you need to trigger a manual reindex.
Another way to start the indexing of suggestions is by adding a recurring job to the cron table:
algolia_after_create_suggestion_object
event provided by the extension.
See Custom backend events for more information.
Attribute | Description |
---|---|
query | Value |
number_of_results | Number of results |
popularity | Number of searches |
updated_at | Last update timestamp |
searchableAttributes
: unordered(query)
customRanking
: desc(popularity)
, desc(number_of_results)
typoTolerance
: false
attributesToRetrieve
: query
removeWordsIfNoResults
: lastWords
algolia_suggestions_index_before_set_settings
event provided by the extension. See Custom backend events for more information.
algolia_additional_sections_index_before_set_settings
event provided by the extension.
See Custom Backend Events for a list of events provided by the extension.
Attribute | Description | |
---|---|---|
value | The attributes’ value, for example, Red, XL, Nike. |
searchableAttributes
: unordered(value)
algolia_additional_sections_index_before_set_settings
event provided by the extension.
See Custom Backend Events for a list of events provided by the extension.
algolia_delete_products
indexer:
/magento/
in the URL.
Most likely, this is because web server rewrites are turned off.
Go to Stores > Configuration > General > Web > Search Engine Optimization and set the field Use Web Server Rewrites to Yes.
When this setting is updated, a full reindex is required for the changes to take effect.